package action.UserAction;

import javax.servlet.http.HttpSession;

import org.apache.struts2.ServletActionContext;

import com.opensymphony.xwork2.ActionSupport;

import domain.UserInfo;

public class UpdateUser extends ActionSupport {
	UserInfo user;

	public UserInfo getUser() {
		return user;
	}

	public void setUser(UserInfo user) {
		this.user = user;
	}
	public String execute() throws Exception {
		HttpSession session=ServletActionContext.getRequest().getSession();
		UserInfo UserLogin=(UserInfo)session.getAttribute("UserLogin");
		user.setUserId(UserLogin.getUserId());
		user.setUserName(UserLogin.getUserName());
		user.setUserPwd(UserLogin.getUserPwd());
		session.setAttribute("userinfo", user);
		return SUCCESS;
	}
	

}
